package com.gupaoedu.demo.simplefactory;

public class SimpleFactory {
    public static void main(String[] args) {
        ICourse course = new JavaCourse();
        course.record();



        CourseFactory factory = new CourseFactory();
        ICourse course1 = factory.create("java");
        course1.record();

        ICourse course2 = factory.course("com.gupaoedu.demo.simplefactory.ICourse.ICourse.JavaCourse");
        course2.record();

        ICourse course3 = factory.courseCreate(JavaCourse.class);
        course3.record();
    }
}
